package com.lsk.util;

import com.jfinal.plugin.activerecord.Record;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 农商行请求工具类
 */

public class NshPayUtil {

    /**
     * 组装报文头
     * @param sequenceId 32位唯一请求序列号
     * @param transCode 交易代码
     * @return
     */
    public static Map<String,Object> assembleReqHeard(String sequenceId,String transCode){


        Map<String,Object> heardMap=new LinkedHashMap<>();

        String appCode="";//appCode

        heardMap.put("appCode",appCode);

        String version="1.0";//版本号

        heardMap.put("version",version);

        //String sequenceId=sequenceId;//请求序列号

        heardMap.put("sequenceId",sequenceId);

        String timestamp=System.currentTimeMillis()+"";// 17位时间戳

        heardMap.put("timestamp",timestamp);


        String charset="UTF-8";//交易编码

        heardMap.put("charset",charset);


        String algorithm="SHA256withRSA";//加密算法

        heardMap.put("algorithm",algorithm);

        String deviceId="888888";//设备id

        heardMap.put("deviceId",deviceId);

        String channelId="45";//交易渠道号

        heardMap.put("channelId",channelId);

        heardMap.put("transCode",transCode);//交易码:各接口对应交易码

        String Content_Type="application/x-www-form-urlencoded";

        heardMap.put("Content-Type",Content_Type);//交易码:各接口对应交易码

        String branchId="";//交易机构号

        heardMap.put("branchId",branchId);//交易码:各接口对应交易码

        return heardMap;

    }


    public static Map<String,Object> assembleReqBody(){






        return null;

    }


}
